home *** CD-ROM | disk | FTP | other *** search
/ CU Amiga Super CD-ROM 27 / CU Amiga Magazine's Super CD-ROM 27 (1998)(EMAP Images)(GB)[!][issue 1998-10].iso / GoodBye / JohnKennedy / February96.lha / FEATURES / MIME.LHA / mime.doc next >
Encoding:
Text File  |  1996-02-06  |  7.5 KB  |  216 lines

  1. Wired World
  2.  
  3.  
  4. A picture's worth a thousand words...
  5.  
  6. Why limit your email to text? With MIME you can include
  7. graphics, sounds -- even animations.
  8.  
  9.  
  10. If you been using electronic mail or lurking around in the
  11. Usenet newsgroups, you will probably have come across files
  12. which have been UUENCODED. UUENCODING is a method of
  13. converting a standard binary file, for example a program or
  14. IFF image, into a mass of text. The text can then be sent
  15. via email or included in a news posting.
  16.  
  17. UUENCODING is required because text systems only use 7 bits
  18. out of 8 to store the various letters and punctucation
  19. symbols. If you sent a program and missed out one bit in
  20. eight, whatever arrived at the other end would be totally
  21. useless.
  22.  
  23. Image:mime1.iff 
  24. Caption: When you UUENCODE a file it is converted into text.
  25. You can't read it, but you can UUDECODE it to bring back the
  26. original file.
  27.  
  28. MIME is an attempt at making this UUENCODING process as
  29. simple and invisible as possible. It stands for
  30. "Multipurpose Internet Mail Extensions". It too encodes
  31. binary files into text format, but this time uses a slightly
  32. different standard called Base64. However, the important
  33. thing is the way in which the MIME mailing program works.
  34.  
  35. Unlike the traditional UUENCODE way, the user does not need
  36. to play around with messy CLI only utilities. Instead, they
  37. only need drag a file or two into a special window and it is
  38. converted automatically. Each file is convered into a MIME
  39. "partial" and included in the mail message. It is even more
  40. impressive is what happens when the message reaches its
  41. destination, for when set up properly, an image will
  42. automatically be displayed, and a MED tune automatically
  43. played. MIME is the ultimate way to exchange data by
  44. electronic mail.
  45.  
  46.  
  47. Subhead: Using METATOOL
  48.  
  49. To use MIME on the Amiga, you'll need a program called
  50. MetaTool. MetaTool was written by Ellis Pritchard and is
  51. available from the Aminet. I'm assuming that you already
  52. have a email system operating on the Amiga, and therefore
  53. have experience with either a Mailkick or AmiPOP program for
  54. sending and receiving mail. For example, if you are a Demon
  55. customer you'll be using the SendMail program for handling
  56. the mail transfer.
  57.  
  58. Before you can start using MetaTool, you will need to make
  59. sure that you have set up some environmental variables.
  60. These sound horrendous, but it only means you need to
  61. include the settings for your user name, domain name and
  62. host name. The user name will be the name of your internet
  63. postbox, and this will be the first name you picked when you
  64. signed up with your service provider. The domain name is the
  65. section you didn't pick yourself after @ sign in your email
  66. address, and the host name the part you chose. For example,
  67. my email address is "johnk@infosys2.thegap.com" and so I set
  68. the variables like this:
  69.  
  70. setenv USER Johnk
  71. setenv DOMAINNAME thegap.com
  72. setenv HOST infosys-2
  73.  
  74. If your address was "brian@toastrack.demon.co.uk" then you
  75. would set the variables like this:
  76.  
  77. setenv USER brian
  78. setenv DOMAINNAME demon.co.uk
  79. setenv HOST toastrack
  80.  
  81. You can either type these directly into the Shell every time
  82. you re-boot your Amiga, or save yourself a lot of time and
  83. include them in your s:user-startup file. You may find that
  84. they have been created for you when you installed AmiTCP:
  85. you can check by typing setenv by itself and see watch to
  86. see if USER, DOMAINNAME and HOST whizz past.
  87.  
  88. You'll also need to be using everyone's favourite Graphical
  89. User Interface, Magic User Interface. If you are a heavy
  90. Internet user you will probably alreay have MUI installed to
  91. let you run AMosic or IBrowse.
  92.  
  93. Starting MetaTool should be painless if you remembered the
  94. right setenv commands. and you'll see your "mail box"
  95. included in the list. Open it up, and you are ready to send
  96. a MIME message.
  97.  
  98. image: mime2.iff)
  99. caption: MetaTool organises the mail into different
  100. mailboxes. The name comes from the USERNAME environmental
  101. variable.
  102.  
  103.  
  104. Press Right Amiga-N to create a new message. You see the
  105. compose window appear, and there will already be one element
  106. in the list on the left. This is the "header", and you
  107. should select it and press the EDIT button. Now you can
  108. enter the email address of the recepient and any subject the
  109. message may have.
  110.  
  111.  
  112. Image: mime3.iff
  113. caption: You can send copies of your mail message to others
  114. by including names in other fields.
  115.  
  116.  
  117.  
  118. The easiest way to create a message is to drag and drop
  119. icons into the window. Create a text file, and save it. Then
  120. find the icon and drag it into the window. You can drag and
  121. drop IFF images, LHA files or just about anything you can
  122. imaging. Metatool will package them all up and when you
  123. click on SEND or DISPATCH it will use the mailer program you
  124. have running to send the message over the Internet.
  125.  
  126. You can also create parts of the message manually, without
  127. dragging and dropping. Click on the NEW button, and you can
  128. select the type of the object you want to send. You will
  129. then be given a file requestor so you can select the file.
  130.  
  131. Image: mime4.iff
  132. Caption: You can drag-and-drop files, or create them from
  133. scratch and use a file requestor.
  134.  
  135.  
  136. When you receive a MIME message, you can view it in MetaTool
  137. simply by clicking on the constituent parts in the mesage
  138. list. But how does the Amiga know what to do with each type
  139. of file? This is the tricky section, but it's the only way
  140. to really harness the power of the MIME system.
  141.  
  142.  
  143. Subhead: MailCaps and MimeTypes
  144.  
  145.  
  146. To alter what happens to existing files, or to add support
  147. for your own specific application programs, you will need to
  148. enter the murky world of the files called "mailcap" and
  149. "mime.types". Both are in the MetaTool drawer, and you
  150. should edit both with a standard text editor. Before you
  151. start message about with them, it might be a good idea to
  152. make a copy.
  153.  
  154. image: mime5.iff
  155. Caption: Mailcap and meta.types are the two magic files for
  156. determining what happens when you send and receive MIME mail.
  157.  
  158.  
  159. The first file, mime.types, is to help MetaTool work out
  160. what sort of file you have just dropped on top of it. By
  161. default it will recognise many graphics formats, as well the
  162. Amiga-specific AmigaGuide format. Here is how the AmigaGuide
  163. format is included:
  164.  
  165.  
  166. text/x-aguide        guide GUIDE
  167.  
  168. It's nothing too amazing: the file is obviously text based,
  169. so the definition begins with "text/". It's not a standard
  170. extension so there is an "x-" added to make this clear. Then
  171. we have the possible file extension names in upper and lower
  172. case.
  173.  
  174. The mailcap file tells MetaTool what to do when a MIME file
  175. is received. Let's see how it mentions AmigaGuide files:
  176.  
  177.  
  178. text/x-aguide; MultiView %s; label="An AmigaGuide file"; edit="emacs %s"
  179.  
  180. The matching line in the mailcap file tells MetaTool that
  181. when a x-aguide file is shown, the Amiga must use Multiview.
  182. That's what the section "MultiView %s" means, as the "%s"
  183. will be replaced with the filename.
  184.  
  185. The last part of the line tells MetaTool what to do when the
  186. file is edited. In this case, the emacs program is spawned.
  187. You may not have emacs on your Amiga (I certainly don't,
  188. because I'm sane) and you may want to edit this line to
  189. reflect your own choice, such as CygnusEd or GoldEd.
  190.  
  191. You can easily extend this system yourself to both control
  192. exactly what application is triggered to take card of an
  193. incoming partial, and to add support for many other file
  194. types. As long as both your system and the system of whoever
  195. you are sending the message to have suitable entries in
  196. mime.types and mailcap you should be able to send almost
  197. anything by email.
  198.  
  199.  
  200.  
  201. image: mime6.iff
  202. Caption: Cruel but funny -- MIME can be used to send
  203. pictures as easily as text.
  204.  
  205.  
  206.  
  207.  
  208. John Kennedy
  209.  
  210.  
  211.  
  212.  
  213.  
  214.  
  215.  
  216.